oracle.pgx.common.types

## Enum IdType

- java.lang.Object
- - java.lang.Enum<IdType>
  - - oracle.pgx.common.types.IdType

- All Implemented Interfaces:
    Serializable, Comparable<IdType>, Type

      public enum IdType
      extends Enum<IdType>
      implements Type

  All supported graph ID types (internally known as node key/edge key)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INTEGER` Integer type for Ids
    `LONG` Long type for Ids
    `STRING` String type for Ids

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<?>` | `getTypeClass()` Returns the Java type class that is associated with this IdType.
    `static IdType` | `getTypeFor(Class<?> typeClass)` Returns the IdType based on a typeClass.
    `static IdType` | `parseIdType(String input)` Parse IdType from a string value.
    `String` | `toKey()` Returns the key of this type as string.
    `String` | `toString()` Returns the key of this type as string.
    `static IdType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static IdType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INTEGER

          public static final IdType INTEGER

      Integer type for Ids

    - #### LONG

          public static final IdType LONG

      Long type for Ids

    - #### STRING

          public static final IdType STRING

      String type for Ids

  - ### Method Detail

    - #### getTypeClass

          public Class<?> getTypeClass()

      Returns the Java type class that is associated with this IdType.
      Specified by:
        `getTypeClass` in interface `Type`
      Returns:
        the Java type class that is associated with this IdType.

    - #### getTypeFor

          public static IdType getTypeFor(Class<?> typeClass)

      Returns the IdType based on a typeClass.
      Parameters:
        `typeClass` - Use this typeClass to derive the IdType
      Returns:
        The IdType that belongs to this typeClass

    - #### parseIdType

          public static IdType parseIdType(String input)

      Parse IdType from a string value.
      Parameters:
        `input` - Value to use to parse an IdType from. You can use the output of `toString()` as input.
      Returns:
        The IdType derived from the string input.

    - #### toKey

          public String toKey()

      Description copied from interface: `Type`
      Returns the key of this type as string.
      Specified by:
        `toKey` in interface `Type`
      Returns:
        a JSON string representation of this type

    - #### toString

          public String toString()

      Returns the key of this type as string. See `toKey()`.
      Overrides:
        `toString` in class `Enum<IdType>`
      Returns:
        the String representation of this type, which is the enum name.

    - #### valueOf

          public static IdType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### values

          public static IdType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (IdType c : IdType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

Copyright © 2015. All rights reserved.